# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libkleo
pkgver=20.04.3
pkgrel=0
pkgdesc="KDE PIM cryptographic library"
arch="all !armhf"
url="https://kontact.kde.org"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev ki18n-dev kconfig-dev kwidgetsaddons-dev kcompletion-dev kwindowsystem-dev kcoreaddons-dev kcodecs-dev kitemmodels-dev kpimtextedit-dev gpgme-dev boost-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkleo-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="a318ba0517e193e69969427e8edb69c8a127deea9ae7e8ebf6ad0a6766ee237cedcf67322c47e3fb6d65aef94e7f54bc2d6d444743aa9753e0daa422ad23e1fb  libkleo-20.04.3.tar.xz"
